Skip to content

feat: add version history page#2025

Draft
ShroXd wants to merge 6 commits intonpmx-dev:mainfrom
ShroXd:linkable-version-page
Draft

feat: add version history page#2025
ShroXd wants to merge 6 commits intonpmx-dev:mainfrom
ShroXd:linkable-version-page

Conversation

@ShroXd
Copy link
Contributor

@ShroXd ShroXd commented Mar 10, 2026

🔗 Linked issue

Resolves #1846

🧭 Context

📚 Description

@vercel
Copy link

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 12, 2026 7:13am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 12, 2026 7:13am
npmx-lunaria Ignored Ignored Mar 12, 2026 7:13am

Request Review

@ShroXd ShroXd changed the title feat: add basic version page with mock data feat: add version history page Mar 11, 2026
@ShroXd ShroXd force-pushed the linkable-version-page branch from dd33ecc to 2873b63 Compare March 11, 2026 14:49
Comment on lines +10 to +16
const route = useRoute()
const router = useRouter()

const packageName = computed(() => {
const { org, name } = route.params as { org?: string; name: string }
return org ? `${org}/${name}` : (name as string)
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we enables the experimental typed pages (ref. Experimental Features · Nuxt Advanced v4), you can get the fully typed route with this:

Suggested change
const route = useRoute()
const router = useRouter()
const packageName = computed(() => {
const { org, name } = route.params as { org?: string; name: string }
return org ? `${org}/${name}` : (name as string)
})
const route = useRoute('package-version')
const router = useRouter()
const packageName = computed(() => {
const { org, name } = route.params
return org ? `${org}/${name}` : name
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linkable package page to show list of versions

2 participants